home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////
- // OpenGLFont - A OpenGL-DIGITAL-RAINBOWS EXTENSION FOR FONT SUPPORT
- //
- //////////////////////////////////////////////////////////////////////
-
- #if !defined(AFX_OPENGLFONT_H__9506C5C2_415D_11D4_9493_83061F1FAC44__INCLUDED_)
- #define AFX_OPENGLFONT_H__9506C5C2_415D_11D4_9493_83061F1FAC44__INCLUDED_
-
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
-
- #include <TCHAR.h>
-
- #ifdef _WINDOWS_
- #include "windows.h"
- #else
- #include "afxwin.h"
- #endif
-
- #include <gl\gl.h> // OpenGL
- #include <gl\glu.h> // GLU library
- #include "GFFileSystem.h"
-
- class OpenGLFont
- {
- // PUBLIC
- public:
- void FunPrint(LPCTSTR text, short x, short y);
- void Print(LPCTSTR text, short x, short y); // Print a String / Int / Float
- void Print(int fig, short x, short y);
- void Print(float fig, short x, short y);
- void ColorPrint(LPCTSTR text, short x, short y, COLORREF col, float alpha); // Print colored Text
- void ColorPrint(float fig, short x, short y, COLORREF col, float alpha);
- void ColorPrint(int fig, short x, short y, COLORREF col, float alpha);
- void SetScreenWidth(GLshort s) {this->ScreenX=s;} // Set Screen X Size for linebreak
- bool Init(LPCTSTR szFileName, int screenx=800); // Create & Load Font
- OpenGLFont();
- virtual ~OpenGLFont(); // Destruct
-
- // PRIVATE
- protected:
- bool LoadBMPTexture(LPCTSTR szFileName, COLORREF colorkey); // Intern
-
- GLshort SizeX;
- GLshort SizeY;
- GLshort ScreenX;
- GLuint Texture[128];
- };
-
- #endif // !defined(AFX_OPENGLFONT_H__9506C5C2_415D_11D4_9493_83061F1FAC44__INCLUDED_)
-
-
-